package com.qyhl.question.question.challenge;


import com.qyhl.webtv.commonlib.entity.question.ClassicShareBean;
import com.qyhl.webtv.commonlib.entity.question.QuestionChallengeBean;

public class QuestionChallengePresenter implements QuestionChallengeContract.QuestionChallengePresenter {
    private QuestionChallengeActivity mView;
    private QuestionChallengeModel mModel;

    QuestionChallengePresenter(QuestionChallengeActivity mView) {
        this.mView = mView;
        this.mModel = new QuestionChallengeModel(this);
    }


    @Override
    public void startChallenge(String username, String subjectId) {
        mModel.startChallenge(username, subjectId);
    }

    @Override
    public void submit(int recordId, int questionId, String answer, int seconds) {
        mModel.submit(recordId, questionId, answer, seconds);
    }

    @Override
    public void submitTimeOut(int recordId, int questionId, int seconds) {
        mModel.submitTimeOut(recordId, questionId, seconds);
    }

    @Override
    public void doShare(int recordId) {
        mModel.doShare(recordId);
    }

    @Override
    public void startSuccess(QuestionChallengeBean bean) {
        mView.startSuccess(bean);
    }

    @Override
    public void startError(String msg) {
        mView.startError(msg);
    }

    @Override
    public void submitSuccess(QuestionChallengeBean bean) {
        mView.submitSuccess(bean);
    }

    @Override
    public void submitError(String msg) {
        mView.submitError(msg);
    }

    @Override
    public void timeOutSuccess(QuestionChallengeBean bean) {
        mView.timeOutSuccess(bean);
    }

    @Override
    public void timeOutError(String msg) {
        mView.timeOutError(msg);
    }

    @Override
    public void shareResult(ClassicShareBean bean, String msg) {
        mView.shareResult(bean, msg);
    }
}
